* {
  margin: 0;
  padding: 0;
  list-style: none;
}

.slider {
  height: 360px;
  width: 720px;
  margin: 100px auto;
  position: relative;

  ul {

    li {
      position: relative; // 必须要，否则动画翻转时会上下跑；
      height: 360px;
      float: left;
      perspective: 50000px;
      transform-style: preserve-3d;
      transition: all 1s ease;

      div {
        position: absolute; // 必须要，为了脱离文档流；否则会换行
        height: 360px;
        width: 180px;

        &:nth-child(1) {
          background: url("./img/fq1.jpg");
          transform: translateZ(180px);
        }

        &:nth-child(2) {
          background: url("./img/fq2.jpg");
          transform: rotateX(-90deg) translateZ(180px);
        }

        &:nth-child(3) {
          background: url("./img/fq3.jpg");
          transform: rotateX(-180deg) translateZ(180px);
        }

        &:nth-child(4) {
          background: url("./img/fq4.jpg");
          transform: rotateX(-270deg) translateZ(180px);
        }
      }
    }
  }
}

.button-container {
  margin: 100px 0;
  text-align: center;

  .next {
    font-size: 20px;
    padding: 10px 20px;
  }
}
